#include "productinfo.h"
#include "remotedef.h"
#include <QVariant>

ProductInfo::ProductInfo()
    :BaseResp()
{
    name = "";
    type = "";
    company = "";
    website = "";
    terminal_version = "";
    sn = "";
}

void ProductInfo::unserialize(QString json)
{
    BaseResp::unserialize(json);
    if (m_json.isValid())
    {
        name = m_json.value(KEY_PRODUCT_NAME).toString();
        type = m_json.value(KEY_PRODUCT_TYPE).toString();
        company = m_json.value(KEY_PRODUCT_COMPANY).toString();
        website = m_json.value(KEY_PRODUCT_WEBSITE).toString();
        terminal_version = m_json.value(KEY_PRODUCT_TERMINAL_V).toString();
        sn = m_json.value(KEY_PRODUCT_SN).toString();
    }
}

QString ProductInfo::getName() const
{
    return name;
}

void ProductInfo::setName(const QString &value)
{
    name = value;
}
QString ProductInfo::getType() const
{
    return type;
}

void ProductInfo::setType(const QString &value)
{
    type = value;
}
QString ProductInfo::getCompany() const
{
    return company;
}

void ProductInfo::setCompany(const QString &value)
{
    company = value;
}
QString ProductInfo::getWebsite() const
{
    return website;
}

void ProductInfo::setWebsite(const QString &value)
{
    website = value;
}
QString ProductInfo::getSn() const
{
    return sn;
}

void ProductInfo::setSn(const QString &value)
{
    sn = value;
}
QString ProductInfo::getTerminalVersion() const
{
    return terminal_version;
}

void ProductInfo::setTerminalVersion(const QString &value)
{
    terminal_version = value;
}






